{literal}
<script language="javascript" type="text/javascript">
	tinyMCE.init({
		language: "ru",
		mode : "textareas",
		elements : "",
		theme : "advanced",
		plugins : "preview,fullscreen,paste,table,contextmenu, advimage, advlink,nonbreaking,style",
		theme_advanced_buttons1_add: "separator,forecolor,backcolor",
		theme_advanced_buttons2_add : "separator,fullscreen,preview",
		theme_advanced_buttons2_add_before : "pastetext,pasteword,table,separator,nonbreaking,|,styleprops,",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",
		file_browser_callback : "ajaxfilemanager",
		
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		
		document_base_url : "/",
		content_css : "/css/style.css",
		relative_urls : false,
		external_image_list_url : ""
	});
	
	
	function ajaxfilemanager(field_name, url, type, win) {
			var ajaxfilemanagerurl = "/js/editor/plugins/ajaxfilemanager/ajaxfilemanager.php";
			switch (type) {
				case "image":
					break;
				case "media":
					break;
				case "flash": 
					break;
				case "file":
					break;
				default:
					return false;
			}
			var fileBrowserWindow = new Array();
			fileBrowserWindow["file"] = ajaxfilemanagerurl;
			fileBrowserWindow["title"] = "Загрузка файлов";
			fileBrowserWindow["width"] = "782";
			fileBrowserWindow["height"] = "440";
			fileBrowserWindow["close_previous"] = "no";
			tinyMCE.openWindow(fileBrowserWindow, {
			  window : win,
			  input : field_name,
			  resizable : "yes",
			  inline : "yes",
			  editor_id : tinyMCE.getWindowArg("editor_id")
			});
			
			return false;
		}
</script>
{/literal}

<h3>{$page.title}</h3>
<span class="system">{$system.message}</span>
<form method="post" action="">
<input type="hidden" name="item[id]" value="{$id}">
{html_select_date prefix="news_" field_order="DMY" time=$item.time}<br>
<label for="title">Название</label><span class="tips" onclick="show('title_tip');return false;">[?]</span><span id="title_tip"></span><br>
<input type="text" value="{$item.title}" name="item[title]" id="title"><br>
<label for="anounce">Анонс</label><span class="tips" onclick="show('anounce_tip');return false;">[?]</span><span id="anounce_tip"></span><br>
<textarea style="width:100%;" cols="40" rows="3" name="item[anounce]" id="anounce">{$item.anounce}</textarea><br>
<label for="content">Содержание</label><span class="tips" onclick="show('content_tip');return false;">[?]</span><span id="content_tip"></span><br>
<textarea style="width:100%;" cols="40" rows="7" name="item[content]" id="content">{$item.content}</textarea><br>
<label for="photo">Изображение</label><span class="tips" onclick="show('photo_tip');return false;">[?]</span><span id="photo_tip"></span><br>
<input type="file" name="news_photo" id="photo"><br>
<span>Статус</span><span class="tips" onclick="show('status_tip');return false;">[?]</span><span id="status_tip"></span><br>
<input type="radio" name="item[status]" value="0" id="status_0"><label for="status_0">Скрыта</label><br>
<input type="radio" name="item[status]" value="1" id="status_1"><label for="status_1">Отображается</label><br>
<input type="radio" name="item[status]" value="2" id="status_2"><label for="status_2">Только для авторизованных пользователей</label><br>
<input type="submit" value="Добавить" name="submit" id="submit">
</form>